var crypto = require('crypto');
var fs = require('fs');

var filename = process.argv[2] || 'C:/Windows/notepad.exe';

var hash = crypto.createHash('sha1');

var s = fs.ReadStream(filename);
s.on('data', function(d) {
    hash.update(d);
});

s.on('end', function() {
    console.log(filename + '\t=>\t' + hash.digest('hex'));
});
